home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / obero / oberon_lib.lha / oberon-a / source1.lha / source / Amiga / MathIEEEDoubBas.mod < prev    next >
Text File  |  1994-08-08  |  3KB  |  158 lines

  1. (**************************************************************************
  2.  
  3.      $RCSfile: MathIEEEDoubBas.mod $
  4.   Description: Interface to mathieeedoubbas.library
  5.  
  6.    Created by: fjc (Frank Copeland)
  7.     $Revision: 3.2 $
  8.       $Author: fjc $
  9.         $Date: 1994/08/08 00:42:13 $
  10.  
  11.   Includes Release 40.15
  12.  
  13.   (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  14.       All Rights Reserved
  15.  
  16.   Oberon-A interface Copyright © 1994, Frank Copeland.
  17.   This file is part of the Oberon-A Interface.
  18.   See Oberon-A.doc for conditions of use and distribution.
  19.  
  20. ***************************************************************************)
  21.  
  22. MODULE MathIEEEDoubBas;
  23.  
  24. (*
  25.  
  26.   This module is not defined.  This is because the compiler cannot yet
  27.   handle the LONGREAL as an 8-byte IEEE double-precision real.
  28.   Patience.
  29.  
  30. *)
  31.  
  32. (*
  33. (*
  34. ** $C- CaseChk       $I- IndexChk  $L+ LongAdr   $N- NilChk
  35. ** $P- PortableCode  $R- RangeChk  $S- StackChk  $T- TypeChk
  36. ** $V- OvflChk       $Z- ZeroVars
  37. *)
  38.  
  39. IMPORT SYS := SYSTEM, E := Exec, M := MathLibrary;
  40.  
  41.  
  42. (*-- MathIEEEDoubBas Base variable --------------------------------------*)
  43.  
  44. TYPE
  45.  
  46.   MathIEEEDoubBasBasePtr * = CPOINTER TO MathIEEEDoubBasBase;
  47.   MathIEEEDoubBasBase * = RECORD (M.MathIEEEBase) END;
  48.  
  49. CONST
  50.  
  51.   Name * = "mathieeedoubbas.library";
  52.   mathIEEEDoubBasName * = Name;
  53.  
  54. VAR
  55.  
  56.   Base * : MathIEEEDoubBasBasePtr;
  57.  
  58.  
  59. (*-- Library Functions ------------------------------------------------*)
  60.  
  61.  
  62. LIBCALL (base : MathIEEEDoubBasBasePtr ) Fix*
  63.   ( parm [0] : E.DOUBLE )
  64.   : LONGINT;
  65.   - 30;
  66.  
  67. LIBCALL (base : MathIEEEDoubBasBasePtr ) Flt*
  68.   ( integer [0] : LONGINT  )
  69.   : E.DOUBLE;
  70.   - 36;
  71.  
  72. LIBCALL (base : MathIEEEDoubBasBasePtr ) Cmp*
  73.   ( leftParm  [0] : E.DOUBLE;
  74.     rightParm [1] : E.DOUBLE )
  75.   : LONGINT;
  76.   - 42;
  77.  
  78. LIBCALL (base : MathIEEEDoubBasBasePtr ) Tst*
  79.   ( parm [0] : E.DOUBLE )
  80.   : LONGINT;
  81.   - 48;
  82.  
  83. LIBCALL (base : MathIEEEDoubBasBasePtr ) Abs*
  84.   ( parm [0] : E.DOUBLE )
  85.   : E.DOUBLE;
  86.   - 54;
  87.  
  88. LIBCALL (base : MathIEEEDoubBasBasePtr ) Neg*
  89.   ( parm [0] : E.DOUBLE )
  90.   : E.DOUBLE;
  91.   - 60;
  92.  
  93. LIBCALL (base : MathIEEEDoubBasBasePtr ) Add*
  94.   ( leftParm  [0] : E.DOUBLE;
  95.     rightParm [1] : E.DOUBLE )
  96.   : E.DOUBLE;
  97.   - 66;
  98.  
  99. LIBCALL (base : MathIEEEDoubBasBasePtr ) Sub*
  100.   ( leftParm  [0] : E.DOUBLE;
  101.     rightParm [1] : E.DOUBLE )
  102.   : E.DOUBLE;
  103.   - 72;
  104.  
  105. LIBCALL (base : MathIEEEDoubBasBasePtr ) Mul*
  106.   ( leftParm  [0] : E.DOUBLE;
  107.     rightParm [1] : E.DOUBLE )
  108.   : E.DOUBLE;
  109.   - 78;
  110.  
  111. LIBCALL (base : MathIEEEDoubBasBasePtr ) Div*
  112.   ( dividend [0] : E.DOUBLE;
  113.     divisor  [1] : E.DOUBLE )
  114.   : E.DOUBLE;
  115.   - 84;
  116.  
  117. LIBCALL (base : MathIEEEDoubBasBasePtr ) Floor*
  118.   ( parm [0] : E.DOUBLE )
  119.   : E.DOUBLE;
  120.   - 90;
  121.  
  122. LIBCALL (base : MathIEEEDoubBasBasePtr ) Ceil*
  123.   ( parm [0] : E.DOUBLE )
  124.   : E.DOUBLE;
  125.   - 96;
  126.  
  127.  
  128. (*-- Library Base variable --------------------------------------------*)
  129. (* $L- Address globals through A4 *)
  130.  
  131.  
  132. (*-----------------------------------*)
  133. PROCEDURE* CloseLib ();
  134.  
  135. BEGIN (* CloseLib *)
  136.   IF Base # NIL THEN E.Base.CloseLibrary (Base) END
  137. END CloseLib;
  138.  
  139. (*-----------------------------------*)
  140. PROCEDURE OpenLib * ();
  141.  
  142. BEGIN (* OpenLib *)
  143.   IF Base = NIL THEN
  144.     Base :=
  145.       SYS.VAL
  146.         ( MathIEEEDoubBasBasePtr,
  147.           E.Base.OpenLibrary (Name, E.libraryMinimum) );
  148.     IF Base = NIL THEN HALT (100) END;
  149.     SYS.SETCLEANUP (CloseLib)
  150.   END;
  151. END OpenLib;
  152.  
  153.  
  154. BEGIN
  155.   Base := NIL
  156. *)
  157. END MathIEEEDoubBas.
  158.